[rel-db] Fix meeting.import#3287
[rel-db] Fix meeting.import#3287luisa-beerboom merged 9 commits intoOpenSlides:feature/relational-dbfrom
Conversation
…l-db-fix-meeting-import-cherry-pick
vkrasnovyd
left a comment
There was a problem hiding this comment.
Great job! I like that you've also added missing test cases and data assertions.
I've added comments about rel-db specific syntax.
| "user/1": { | ||
| "organization_management_level": None, | ||
| "committee_ids": [1], | ||
| "committee_management_ids": [1], | ||
| }, | ||
| "committee/60": {"user_ids": [1], "manager_ids": [1]}, | ||
| } |
There was a problem hiding this comment.
In this case committee_ids and committee_management_ids should be 60. And it's not even needed to set these fields manually because they are a back relation and a calculated field.
I'd suggest using self.set_committee_management_level([60]) instead of manually setting these 4 fields.
There was a problem hiding this comment.
Done, also used set_organization_management_level
There was a problem hiding this comment.
In this case you can also get completely rid of set_models by updating self.meeting_data before calling self.set_test_data_with_admin()
| except InvalidOperation: | ||
| raise ActionException( | ||
| f"{self.own_field_name}: value '{value}' couldn't be converted to decimal." | ||
| ) |
There was a problem hiding this comment.
I love that error message for this error became more descriptive.
8c4e303
into
OpenSlides:feature/relational-db
Rebase was being difficult, so I cherry picked the commits instead.
Replaces #3281